package com.cykj.eurekaclient.service.impl;

import com.cykj.eurekaclient.bean.RouteInfo;
import com.cykj.eurekaclient.mapping.RouteInfoMapper;
import com.cykj.eurekaclient.service.RouteService;
import com.cykj.eurekaclient.utils.RouteInfoTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RouteServiceImpl implements RouteService {

    @Autowired
    RouteInfoMapper routeInfoMapper;

    /**
     * @version 1.0
     * @author: zhiMing
     * @date: 2021/9/24 17:00
     * @desc: 获取路线的时刻集合
     */
    @Override
    public RouteInfo getTimeNodeList(String route) {
        RouteInfo routeInfo = routeInfoMapper.getTimeNodeList(route);
        routeInfo.setTimeParagraphList(RouteInfoTool.getRouteTimeNodeList(routeInfo));
        return routeInfo;
    }
}
